﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Collections;

namespace DataAccess.Helpers
{
	public enum CategoryType : byte
	{
		Article = 1,
		Evenement = 2,
	}
	public enum ValidationType : byte
	{
		Attente = 1,
		Valide = 2,
		Rejete = 3,
	}
	public enum StatusType : byte
	{
		Visible = 1,
		Attente = 2,
		Invisible = 3,
	}
	public enum CommentType : byte
	{
		Article = 1,
		Evenement = 2,
	}
	public enum ReferenceType : byte
	{
		Edito = 1,
		Intro = 2,
	}

	public class CategoryTypeList : IEnumerable
	{
		private IEnumerable<dynamic> _list = new dynamic[]
		{
			new { Id = (byte)CategoryType.Article, Name = CategoryType.Article.ToString() },
			new { Id = (byte)CategoryType.Evenement, Name = CategoryType.Evenement.ToString() },
		};

		public IEnumerator GetEnumerator()
		{
			return _list.GetEnumerator();
		}
	}

	public class ValidationTypeList : IEnumerable
	{
		private IEnumerable<dynamic> _list = new dynamic[]
		{
			new { Id = (byte)ValidationType.Attente, Name = ValidationType.Attente.ToString() },
			new { Id = (byte)ValidationType.Rejete, Name = ValidationType.Rejete.ToString() },
			new { Id = (byte)ValidationType.Valide, Name = ValidationType.Valide.ToString() },
		};

		public IEnumerator GetEnumerator()
		{
			return _list.GetEnumerator();
		}
	}

	public class StatusTypeList : IEnumerable
	{
		private IEnumerable<dynamic> _list = new dynamic[]
		{
			new { Id = (byte)StatusType.Visible, Name = StatusType.Visible.ToString() },
			new { Id = (byte)StatusType.Attente, Name = StatusType.Attente.ToString() },
			new { Id = (byte)StatusType.Invisible, Name = StatusType.Invisible.ToString() },
		};

		public IEnumerator GetEnumerator()
		{
			return _list.GetEnumerator();
		}
	}

	public class CommentTypeList : IEnumerable
	{
		private IEnumerable<dynamic> _list = new dynamic[]
		{
			new { Id = (byte)CommentType.Article, Name = CommentType.Article.ToString() },
			new { Id = (byte)CommentType.Evenement, Name = CommentType.Evenement.ToString() },
		};

		public IEnumerator GetEnumerator()
		{
			return _list.GetEnumerator();
		}
	}

	public class ReferenceTypeList : IEnumerable
	{
		private IEnumerable<dynamic> _list = new dynamic[]
		{
			new { Id = (byte)ReferenceType.Edito, Name = ReferenceType.Edito.ToString() },
			new { Id = (byte)ReferenceType.Intro, Name = ReferenceType.Intro.ToString() },
		};

		public IEnumerator GetEnumerator()
		{
			return _list.GetEnumerator();
		}
	}
}